
<?php
header('Access-Control-Allow-Origin:*'); 


$dbms = 'mysql';
$host = 'localhost';
$user = 'admin';
$pass = 'admin';
$dbname = 'admin';
$dsn = "$dbms:host=$host;dbname=$dbname";

try{
	$pdo = new PDO($dsn,$user,$pass);
	$pdo->exec('set names utf8');
	$stmt = $pdo->prepare("select name,value from price_shuidao");//python里存的数据表
	$stmt->execute();
	$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
	echo(json_encode($result));
	$pdo = null;
}catch(PODException $e){
	echo "error";
	die ("Error!: " . $e->getMessage() . "<br/>");
}


?>